package com.tmeone.erpone.controller;





import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tmeone.erpone.entity.JsonResult;
import com.tmeone.erpone.entity.TOrderStatus;
import com.tmeone.erpone.service.ITOrderStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tmeone
 * @since 2021-04-19
 */
@RestController
public class TOrderStatusController {

    @Autowired
    private ITOrderStatusService orderStatusService;

    //查询订单状态
    @GetMapping("/orderStatus1")
    public JsonResult getOrderStatus1(){
        List<TOrderStatus> list = orderStatusService.list(new QueryWrapper<TOrderStatus>().lambda().le(TOrderStatus::getId,4));
        return new JsonResult(1,list);
    }
    //查询生产状态
    @GetMapping("/orderStatus2")
    public JsonResult getOrderStatus2(){
        List<TOrderStatus> list = orderStatusService.list(new QueryWrapper<TOrderStatus>().lambda().ge(TOrderStatus::getId,5));
        return new JsonResult(1,list);
    }
}
